﻿using KamRemakeRemake.Common;
using KamRemakeRemake.GameObjects.MapObjects;
using KamRemakeRemake.GameObjects.UnitObjects.Units;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace KamRemakeNET.GameObjects.Players {
    public abstract class Player : IDrawableGameObject {
        protected UnitList Units { get; set; }
        protected Map Map { get; set; }

        public Player(Map map) {
            this.Units = new UnitList();
            this.Map = map;
        }

        public void Draw(GameTime gameTime, SpriteBatch spriteBatch, ContentManager contentManager) {
            this.Units.Draw(gameTime, spriteBatch, contentManager);
        }

        public void LoadContent(ContentManager contentManager) {
            this.Units.LoadContent(contentManager);
        }

        public virtual void Update(GameTime gameTime) {
            this.Units.Update(gameTime);
        }
    }
}
